sync_item_file:
    file.managed:
        - name: /var/bh/lib/scripts/item_paidan_api_files/item_paidan_api_files.sh
        - source: salt://prod/item_files/item_paidan_api_files.sh
        - mode: 700
        - user: amos
        - group: amos
        - makedirs: True
        - backup: minion
        - include_enpty: True
run_sh:
    cmd.run:
        - name: |
          ps -ef|grep 'item_paidan_api_files.sh'|grep -v grep|awk -F ' ' '{print $2}'|xargs kill -9

          bash /var/bh/lib/scripts/item_paidan_api_files/item_paidan_api_files.sh
        - require:
            - file: sync_item_file



